// components/todo/index.js
Component({
  /**
   * 组件的属性列表
   */
  properties: {
    imp: {
      type: Number,
      value: 0
    },
    time: {
      type: Date,
      value: ""
    },
    checked: {
      type: Boolean,
      value: false
    },
    alarm: {
      type: Boolean,
      value: false
    }
  },
  data: {
    colors: [
      "#b12020",
      "#cccc67",
      "#d4257a",
      "#1296db",
      "#2bce69"
    ]
  },

  methods: {
    selectTodo() {
      let c = !this.data.checked
      this.setData({
        checked: c
      })
      this.triggerEvent("change", { value: c }, {})
    },
    setTap(){
      this.triggerEvent("tap",{},{})
    }
  }
})
